# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-boto3
_pkgname=boto3
pkgver=1.10.19
pkgrel=2
pkgdesc='The AWS SDK for Python.'
url='https://pypi.org/project/boto3/#files'
arch=('any')
license=('Apache')
depends=('python2' 'python2-botocore' 'python2-s3transfer' 'python2-jmespath')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
        'setup.py.patch')
sha512sums=('d42864b85c4d983f8241873e988df9f5cf9afe3299c67bef705fab1542c08de3370eafbbb68388b75621f1e2609b6250e6fd7d391d3cfa7a33d4b47431d12468'
            '26657d0b20fcfdb1a7156a5d67f524ef82d93f2a54c83e1683bb5b5317304bd5671e286151752660aca7368fc23a6c78c8d79c17cfc4677d26b4fd99f6317719')

prepare() {
  patch -p1 < setup.py.patch
}

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

